package com.wonders.ssm.common;

import com.alibaba.fastjson.JSON;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * CommonResult
 * Created by lv on 2018/8/2.
 */
public class CommonResult implements Serializable {

    private static final long serialVersionUID = 1541298172595958111L;
    private int code;
    private String message;
    private Map<String, Object> data = new HashMap<>();

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Map<String, Object> getData() {
        return data;
    }

    public void putData(String key, Object obj) {
        data.put(key, obj);
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
